package entidades;
import java.sql.*;
import java.sql.DriverManager;

public class Conexiones {

	public static Connection getConexionODBC() {
		Connection con = null;
		try {
			Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
			con = DriverManager.getConnection("jdbc:odbc:basesViejas",
					"Administrador", "");
		} catch (Exception e) {
			System.out.println("No se ha podido cargar el Driver JDBC-ODBC");
		}
		return con;
	}
	
	public static Connection getConexionMySQL() {
		Connection con = null;	

		try{
		Class.forName("com.mysql.jdbc.Driver"); 
		con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/optica", "root", "puche");
		}
		catch(Exception ex){
		System.out.println("Error tecnico: " + ex.getMessage());
		}
		
		
		return con;
	}

}
